import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';

void main() {
  runApp(Order_Receiving_trends());
}

class Myheader extends ClassicalHeader {
  final String refreshText='下拉刷新';
  final String refreshReadyText='下拉刷新';
  final String refreshingText='正在刷新...';
  final Color infoColor=Colors.grey;
  final String infoText='获得最新订单通知';
  final String refreshedText='获取成功';
  final Color textColor=Color.fromRGBO(22,155,213,1);
}


class Order_Receiving_trends extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
      home:HomePage(),
    );
  }

}
class HomePage extends StatefulWidget {
  @override
  HomePageState createState() => new HomePageState();
}

class HomePageState extends State<HomePage>{

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
            backgroundColor: Color.fromRGBO(51, 51, 51, 1),
            titleSpacing: 0.0,
            title:Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                FlatButton(
                  materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
                  child: Row(
                    children: [
                      Icon(Icons.arrow_back_ios,color: Colors.white,),
                      Text('返回',style: TextStyle(color: Colors.white,fontSize: 16),)
                    ],
                  ),
                  onPressed: (){
                    Navigator.pop(context);//返回上一页
                  },
                ),
                Container(child: Row(children: [
                  Text('消息',style: TextStyle(fontSize: 16,color: Colors.white,),),
                  SizedBox(width: 25,)
                ],),),
                IconButton(icon: Icon(Icons.more_horiz),color: Colors.white, onPressed: (){})
              ],
            )
        ),
        body: Container(
          color:Color.fromRGBO(204, 204, 204, 0.5),
            child: Container(
              child: EasyRefresh(
                header: Myheader(),
                onRefresh: ()async{},
                child: ListView(
                  children: <Widget>[
                    Container(
                      height: 70,
                      color: Colors.white,
                      child: SizedBox(//使用SizedBox给子元素指定固定的宽高
                        height: 70,
                        child: FlatButton(
                          child:Column(
                            children: <Widget>[
                              SizedBox(height: 10,),
                              Row(
                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("您的订单超过24小时没人接，已被取消",style: TextStyle(fontSize: 13),),
                                  Text("2020-11-20"),
                                ],
                              ),
                              SizedBox(height: 10,),
                              Row(

                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("东门取快递",style: TextStyle(fontSize: 10),),
                                  Text("20:30"),
                                ],
                              ),
                            ],
                          ),
                          onPressed: () {
                            setState(() { });
                          },),
                      ),
                    ),
                    SizedBox(height: 10,),
                    Container(
                      height: 70,
                      color: Colors.white,
                      child: SizedBox(//使用SizedBox给子元素指定固定的宽高
                        height: 70,
                        child: FlatButton(
                          child:Column(
                            children: <Widget>[
                              SizedBox(height: 10,),
                              Row(
                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("您的订单超过24小时没人接，已被取消",style: TextStyle(fontSize: 13),),
                                  Text("2020-11-20"),
                                ],
                              ),
                              SizedBox(height: 10,),
                              Row(

                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("东门取快递",style: TextStyle(fontSize: 10),),
                                  Text("20:30"),
                                ],
                              ),
                            ],
                          ),
                          onPressed: () {
                            setState(() { });
                          },),
                      ),
                    ),
                    SizedBox(height: 10,),
                    Container(
                      height: 70,
                      color: Colors.white,
                      child: SizedBox(//使用SizedBox给子元素指定固定的宽高
                        height: 70,
                        child: FlatButton(
                          child:Column(
                            children: <Widget>[
                              SizedBox(height: 10,),
                              Row(
                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("您的订单超过24小时没人接，已被取消",style: TextStyle(fontSize: 13),),
                                  Text("2020-11-20"),
                                ],
                              ),
                              SizedBox(height: 10,),
                              Row(

                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("东门取快递",style: TextStyle(fontSize: 10),),
                                  Text("20:30"),
                                ],
                              ),
                            ],
                          ),
                          onPressed: () {
                            setState(() { });
                          },),
                      ),
                    ),
                    SizedBox(height: 10,),
                    Container(
                      height: 70,
                      color: Colors.white,
                      child: SizedBox(//使用SizedBox给子元素指定固定的宽高
                        height: 70,
                        child: FlatButton(
                          child:Column(
                            children: <Widget>[
                              SizedBox(height: 10,),
                              Row(
                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("您的订单超过24小时没人接，已被取消",style: TextStyle(fontSize: 13),),
                                  Text("2020-11-20"),
                                ],
                              ),
                              SizedBox(height: 10,),
                              Row(

                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("东门取快递",style: TextStyle(fontSize: 10),),
                                  Text("20:30"),
                                ],
                              ),
                            ],
                          ),
                          onPressed: () {
                            setState(() { });
                          },),
                      ),
                    ),
                    SizedBox(height: 10,),
                    Container(
                      height: 70,
                      color: Colors.white,
                      child: SizedBox(//使用SizedBox给子元素指定固定的宽高
                        height: 70,
                        child: FlatButton(
                          child:Column(
                            children: <Widget>[
                              SizedBox(height: 10,),
                              Row(
                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("您的订单超过24小时没人接，已被取消",style: TextStyle(fontSize: 13),),
                                  Text("2020-11-20"),
                                ],
                              ),
                              SizedBox(height: 10,),
                              Row(

                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("东门取快递",style: TextStyle(fontSize: 10),),
                                  Text("20:30"),
                                ],
                              ),
                            ],
                          ),
                          onPressed: () {
                            setState(() { });
                          },),
                      ),
                    ),
                    SizedBox(height: 10,),
                    Container(
                      height: 70,
                      color: Colors.white,
                      child: SizedBox(//使用SizedBox给子元素指定固定的宽高
                        height: 70,
                        child: FlatButton(
                          child:Column(
                            children: <Widget>[
                              SizedBox(height: 10,),
                              Row(
                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("您的订单超过24小时没人接，已被取消",style: TextStyle(fontSize: 13),),
                                  Text("2020-11-20"),
                                ],
                              ),
                              SizedBox(height: 10,),
                              Row(

                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("东门取快递",style: TextStyle(fontSize: 10),),
                                  Text("20:30"),
                                ],
                              ),
                            ],
                          ),
                          onPressed: () {
                            setState(() { });
                          },),
                      ),
                    ),
                    SizedBox(height: 10,),
                    Container(
                      height: 70,
                      color: Colors.white,
                      child: SizedBox(//使用SizedBox给子元素指定固定的宽高
                        height: 70,
                        child: FlatButton(
                          child:Column(
                            children: <Widget>[
                              SizedBox(height: 10,),
                              Row(
                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("您的订单超过24小时没人接，已被取消",style: TextStyle(fontSize: 13),),
                                  Text("2020-11-20"),
                                ],
                              ),
                              SizedBox(height: 10,),
                              Row(

                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("东门取快递",style: TextStyle(fontSize: 10),),
                                  Text("20:30"),
                                ],
                              ),
                            ],
                          ),
                          onPressed: () {
                            setState(() { });
                          },),
                      ),
                    ),
                    SizedBox(height: 10,),
                    Container(
                      height: 70,
                      color: Colors.white,
                      child: SizedBox(//使用SizedBox给子元素指定固定的宽高
                        height: 70,
                        child: FlatButton(
                          child:Column(
                            children: <Widget>[
                              SizedBox(height: 10,),
                              Row(
                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("您的订单超过24小时没人接，已被取消",style: TextStyle(fontSize: 13),),
                                  Text("2020-11-20"),
                                ],
                              ),
                              SizedBox(height: 10,),
                              Row(

                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("东门取快递",style: TextStyle(fontSize: 10),),
                                  Text("20:30"),
                                ],
                              ),
                            ],
                          ),
                          onPressed: () {
                            setState(() { });
                          },),
                      ),
                    ),
                    SizedBox(height: 10,),
                    Container(
                      height: 70,
                      color: Colors.white,
                      child: SizedBox(//使用SizedBox给子元素指定固定的宽高
                        height: 70,
                        child: FlatButton(
                          child:Column(
                            children: <Widget>[
                              SizedBox(height: 10,),
                              Row(
                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("您的订单超过24小时没人接，已被取消",style: TextStyle(fontSize: 13),),
                                  Text("2020-11-20"),
                                ],
                              ),
                              SizedBox(height: 10,),
                              Row(

                                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                children: <Widget>[
                                  Text("东门取快递",style: TextStyle(fontSize: 10),),
                                  Text("20:30"),
                                ],
                              ),
                            ],
                          ),
                          onPressed: () {
                            setState(() { });
                          },),
                      ),
                    ),
                    SizedBox(height: 10,),

                  ],
                ),
              ),
            ),
        ),
      ),
    );
  }
}
